/**
 * @projectName study-note
 * @package Singleton
 * @className Singleton.Test
 */
package Singleton;

/**
 * Test
 * @description 测试类
 * @author answer_wx
 * @date 2022/7/4 14:56
 * @version 1.0
 */
public class Test {
    public static void main(String[] args) {
        Singleton01 singleton01 = Singleton01.getInstance();
        Singleton01 singleton01_1 = Singleton01.getInstance();
        Singleton02 singleton02 = Singleton02.getInstance();
        Singleton02 singleton02_1 = Singleton02.getInstance();
        Singleton03 singleton03 = Singleton03.getInstance();
        Singleton03 singleton03_1 = Singleton03.getInstance();
        Singleton04 singleton04 = Singleton04.getInstance();
        Singleton04 singleton04_1 = Singleton04.getInstance();

        System.out.println(singleton01 == singleton01_1);
        System.out.println(singleton02 == singleton02_1);
        System.out.println(singleton03 == singleton03_1);
        System.out.println(singleton04 == singleton04_1);
    }
}